<template>
	<view class="content">
		<view class="opinion">
			<view class="title">意见反馈</view>
			<textarea value="" v-model="input" placeholder="请填写反馈意见" />
		</view>
		<view class="footer" @click="submit">提交</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				input:''
			}
		},
		methods: {
			submit(){
				if(this.input == ''){
					this.$u.toast('请填写反馈意见');
					return
				}
				this.$http.post('/api/index/feedback',{content: this.input}).then(res => {
					this.$u.toast('反馈成功');
					uni.navigateBack({
						delta:1
					})
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.content{
	min-height: 100vh;
	background-color: #F8F8F8;
	padding: 30rpx;
	box-sizing: border-box;
}
.opinion{
	background:rgba(255,255,255,1);
	border-radius:20px;
	padding: 30rpx;
	box-sizing: border-box;
	.title{
		font-size:18px;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(153,153,153,1);
	}
	textarea{
		margin-top: 20rpx;
		height:300rpx;
		background:rgba(245,245,245,1);
		border-radius:20px;
		font-size:13px;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(153,153,153,1);
		padding: 30rpx;
		box-sizing: border-box;
		width: 100%;
	}
}
.footer{
	width:535rpx;
	height:88rpx;
	background:rgba(63,195,119,1);
	border-radius:10px;
	margin: 70rpx auto;
	line-height: 88rpx;
	text-align: center;
	font-size:15px;
	font-family:PingFang SC;
	font-weight:bold;
	color:rgba(255,255,255,1);
}
</style>
